<?php
namespace AuctionCore\Other;
use Think\Exception;

/**
* 车主列表 单元测试
* @author       Eric Lee
*/
class InterestTest extends \PHPUnit_Framework_TestCase
{

  public static  function testSave(){

      $a = new Interest(1);
      $data = array();
      $data['brand_id'] ='10281';//品牌
      $data['series_id'] ='2704';//车系
      $data['model_id'] ='8406';//车型
      $data['reg_area'] = '2';
      $data['emission_standard'] = '4';
      $data['price_range'] = '3';
      $data['age_range'] = '3';
      $data['com_state'] = '3';
      $data['car_level'] = '3';
      try{
          $rs = $a->save($data);
      }catch (Exception $e){
          echo $e->getMessage();
          $rs = false;
      }

      self::assertTrue($rs?true:false);

    }
    public static function testDetail(){
        $last = M('dealer_interest')->max('int_id');
        $rs = M('dealer_interest')->find($last);
        dump($rs,true,null,false);
        self::assertTrue($rs?true:false);
    }



}

?>